<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>id和class类</title>
  <style>
    .card {
      border: 1px solid #ccc;
      background: pink;
      padding: 20px;
      margin-bottom: 10px;
    }
  </style>
</head>
<body>
  <div>
    <div id="main-header" class="card">
      <h1>我的网站</h1>
      <p>主要是关于前端方面的课程</p>
    </div>
  </div>

  <ul id="main-nav">
    <li><a href="#">主页</a></li>
    <li><a href="#">关于</a></li>
    <li><a href="#">联系</a></li>
  </ul>

  <div id="about">
    <h3>关于我们</h3>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. In impedit voluptatum expedita saepe recusandae veritatis tenetur earum, quos animi sint suscipit iste doloremque exercitationem accusantium rerum corrupti vero labore explicabo.</p>
  </div>
  <div id="contant">
    <h3>联系我们</h3>
    <ul>
      <li>北京昌平区</li>
      <li>电话:8888888888</li>
      <li>QQ: 27732357</li>
    </ul>
  </div>
  <!-- id和class的区别:
      id只能出现一次,不能重复
      class可以出现多次,可以重复
  -->
  <div id="footer">
    <p>Copyright 2020</p>
  </div>
</body>
</html>